package com.ftg.shopping.sp_goodsinfo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftg.shopping.sp_goodsinfo.entity.sp_goodsinfo;
import org.apache.ibatis.annotations.Insert;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface GoodsMapper extends BaseMapper<sp_goodsinfo> {
   @Insert("insert into sp_goodsinfo(id,goodsno,goodsname,goodsphoto,goodsoutprice,goodscount,goodsintroduce,goodsstatus,ontime,sellcount,createtime,updatetime) values(#{id},#{goodsno},#{goodsname},#{goodsphoto},#{goodsoutprice},#{goodscount},#{goodsintroduce},#{goodsstatus},#{ontime},#{sellcount},#{createtime},#{updatetime})")
   int insertgoods(sp_goodsinfo g);

 @Select("select goodsname, goodsphoto,goodsoutprice from sp_goodsinfo   ")
 List<Map<String,Object>> get();

 @Select("select goodsname, goodsphoto, goodsoutprice,photo from sp_goodsinfo where goodsname=#{goodsname} ")
 List<Map<String,Object>> get1(String goodsname);



}
